﻿#include "syntax_tree.h"

void SyntaxTree::push_back(SyntaxNode &node)
{
    m_nodes.push_back(node);
}

std::ostream &operator<<(std::ostream &os, const SyntaxTree &t)
{
    os << "**********************************************" << std::endl;
    for (auto &&node : t.m_nodes)
    {
        os << "============================================" << std::endl;
        os << node;
        os << "============================================" << std::endl;
    }
    os << "**********************************************" << std::endl;
    return os;
}